/**
 * 
 */
package com.skood.security.action;

import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.skood.platform.webapp.action.AppBaseAction;
import com.skood.security.domain.Resource;
import com.skood.security.model.ResourceSearchModel;
import com.skood.security.service.ResourceService;

/**
 * @author keege
 * @date 2013-12-13
 */
@Controller("resourceAction")
@Scope("prototype")
public class ResourceAction extends AppBaseAction<ResourceSearchModel,Resource> {
	private static final long serialVersionUID = 1L;

	@javax.annotation.Resource(name="resourceService")
	private ResourceService service;
	
	private Long id = 0L;
	public String doJsonTree()throws Exception{
		List<com.skood.security.domain.Resource> resources = service.getChildren(id);
		writeJson(resources);
		return null;
	}

	public ResourceService getService() {
		return service;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	
}
